Financial fraud causes significant economic loss and erodes trust in digital payment ecosystems. Traditional rule-only systems struggle with evolving attack patterns, while pure black-box machine learning models are difficult for analysts to interpret during investigations. This paper presents **FraudX**, an end-to-end explainable fraud detection framework that combines supervised learning with rule-based categorization and human-readable explanations. The system generates a labeled synthetic transaction dataset of 10,000 records with 20+ behavioral and contextual features, trains a Random Forest classifier with standardized preprocessing, and deploys inference through an interactive Streamlit dashboard. For each transaction, FraudX outputs a probability-based *Suspicion Score*, a threshold-controlled suspicious flag, a prioritized *Fraud_Type* label, and concise *Suspicion_Reasons*. Experimental evaluation on held-out synthetic test data reports 95.2% accuracy, 94.8% precision, 93.5% recall, and 94.1% F1-score. The proposed architecture demonstrates how operational thresholding, feature-importance-driven explanations, and analyst-oriented visualization can be integrated into a practical fraud triage workflow suitable for academic demonstration and prototype deployment.
Introduction
The text presents FraudX, an AI-based digital payment fraud detection system designed to identify suspicious transactions across banking, e-commerce, and peer-to-peer platforms. With the rapid growth of digital payments, fraudsters use techniques such as device spoofing, credential abuse, cross-border transactions, cryptocurrency channels, and unusual transaction patterns to bypass security systems. FraudX aims to provide scalable fraud detection, explainable results, and flexible operational control.
The system combines Machine Learning (ML), rule-based analysis, and visualization to overcome limitations of traditional fraud detection methods. Existing approaches include rule engines, supervised learning models, and anomaly detection systems, but they often lack either adaptability or interpretability. FraudX integrates ML scoring with fraud-specific rules to generate understandable risk assessments.
The major features of FraudX include:
Synthetic transaction data generation with realistic fraud indicators such as unusual timing, high transaction velocity, VPN usage, new devices, cross-border activity, and sanctioned entities.
Random Forest-based fraud detection model for transaction risk scoring.
Hybrid decision-making layer that combines ML probability scores with rule-based fraud classification.
Streamlit dashboard for uploading data, adjusting thresholds, viewing analytics, and exporting suspicious transactions.
The system architecture consists of four layers:
Data Layer: Generates synthetic data and accepts CSV/PDF transaction uploads.
Training Layer: Preprocesses data and trains the Random Forest model.
Inference and Explanation Layer: Calculates fraud probability, assigns fraud types, and generates reasons.
Presentation Layer: Displays results through an interactive dashboard.
The dataset generation process creates 10,000 transactions with approximately 5% fraudulent cases. Features include identity details, transaction amount, geography, payment method, device information, behavioral patterns, and fraud labels. Fraudulent transactions are designed to show higher amounts, greater transaction velocity, unusual timing, VPN usage, failed attempts, and suspicious location changes.
The ML pipeline includes:
Removing unnecessary identifiers.
Encoding categorical data.
Splitting data into 80% training and 20% testing sets.
Scaling features.
Training a Random Forest Classifier.
Saving the trained model and performance metrics.
During prediction, FraudX generates a Suspicion Score (0–1) and classifies transactions into categories such as:
Known Fraudster
Sanctioned Entity
Crypto Cross-border Laundering
Rapid Large Transfers
Account Takeover Risk
Credential Stuffing
Odd-hour Activity
Medium/High-risk model alerts
The explanation module provides readable reasons behind alerts, such as high transaction amounts, VPN detection, unusual locations, or known fraudster involvement.
The implementation uses:
Python
Pandas and NumPy for data processing
Scikit-learn for machine learning
Joblib for model storage
Plotly/Matplotlib for visualization
Streamlit for the user interface
pdfplumber for PDF data extraction
The experimental results show strong performance on synthetic test data:
Accuracy: 95.20%
Precision: 94.80%
Recall: 93.50%
F1-score: 94.10%
Conclusion
This paper presented **FraudX**, an explainable machine learning framework for financial fraud detection that integrates Random Forest scoring, configurable thresholding, prioritized fraud categorization, and human-readable explanations within an interactive dashboard. On synthetic evaluation data, the system achieves approximately **95% accuracy** with balanced precision and recall. By combining ML ranking with policy-oriented rules and analyst-centric visualization, FraudX illustrates a practical blueprint for fraud triage workflows in academic and prototype environments. Extending the platform with real labeled data, drift monitoring, and governance controls remains essential for production adoption.
References
[1] C. Phua, V. Lee, K. Smith, and R. Gayler, \"A comprehensive survey of data mining-based fraud detection research,\" *arXiv preprint arXiv:1009.6119*, 2010.
[2] F. Carcillo *et al.*, \"Scoring credit card frauds in real-time: A data stream approach,\" in *Proc. ECML PKDD Workshop on Fraud Detection*, 2018.
[3] L. Breiman, \"Random forests,\" *Machine Learning*, vol. 45, no. 1, pp. 5–32, 2001.
[4] A. C. Bahnsen, D. Aouada, A. Stojanovic, and B. Ottersten, \"Feature engineering strategies for credit card fraud detection,\" *Expert Systems with Applications*, vol. 51, pp. 134–142, 2016.
[5] M. T. Ribeiro, S. Singh, and C. Guestrin, \"\'Why should I trust you?\': Explaining the predictions of any classifier,\" in *Proc. ACM SIGKDD Int. Conf. Knowledge Discovery and Data Mining (KDD)*, 2016, pp. 1135–1144.
[6] S. M. Lundberg and S.-I. Lee, \"A unified approach to interpreting model predictions,\" in *Proc. Advances in Neural Information Processing Systems (NeurIPS)*, 2017, pp. 4765–4774.
[7] F. Pedregosa *et al.*, \"Scikit-learn: Machine learning in Python,\" *Journal of Machine Learning Research*, vol. 12, pp. 2825–2830, 2011.
[8] W. McKinney, \"Data structures for statistical computing in Python,\" in *Proc. Python in Science Conf. (SciPy)*, 2010, pp. 56–61.
[9] Streamlit Inc., \"Streamlit: The fastest way to build and share data apps,\" 2024. [Online]. Available: https://streamlit.io
[10] N. V. Chawla, K. W. Bowyer, L. O. Hall, and W. P. Kegelmeyer, \"SMOTE: Synthetic minority oversampling technique,\" *Journal of Artificial Intelligence Research*, vol. 16, pp. 321–357, 2002.
[11] J. Jurgovsky *et al.*, \"Sequence classification for credit-card fraud detection,\" *Expert Systems with Applications*, vol. 100, pp. 234–245, 2018.
[12] P. Dal Pozzolo, O. Caelen, R. A. Johnson, and G. Bontempi, \"Calibrating probability with undersampling for unbalanced classification,\" in *Proc. IEEE Symp. Computational Intelligence and Data Mining (CIDM)*, 2015, pp. 159–166.